# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Balló György <ballogyor+arch at gmail dot com>

pkgname=libhandy0
pkgver=0.0.13+12+gaa6b6f4
pkgrel=3
pkgdesc="Library full of GTK+ widgets for mobile phones"
url="https://gitlab.gnome.org/GNOME/libhandy"
arch=(x86_64)
license=(LGPL)
depends=(glib2 gtk3)
makedepends=(git gobject-introspection meson vala)
checkdepends=(xorg-server-xvfb)
provides=(libhandy-0.0.so)
_commit=aa6b6f43d505383538a2a3e7b4fcdd6a8ada85ff  # libhandy-0-0
source=("git+https://gitlab.gnome.org/GNOME/libhandy.git#commit=$_commit")
sha256sums=('SKIP')

prepare() {
  cd libhandy
}

pkgver() {
  cd libhandy
  git describe --tags | sed 's/^v//;s/-/+/g'
}

build() {
  arch-meson libhandy build \
    -D glade_catalog=disabled \
    -D examples=false
  meson compile -C build
}

check() {
  dbus-run-session xvfb-run \
    -s '-screen 0 1920x1080x24 -nolisten local' \
    meson test -C build --print-errorlogs
}

package() {
  DESTDIR="$pkgdir" meson install -C build
}

# vim:set sw=2 et:
